// 自定义路由对象类型
import { RouteRecordRaw } from 'vue-router';

type MetaConfig = {
  hidden?: boolean;
  title?: string;
  icon?: string;
};

interface MyRouteRecordRaw {
  meta: MetaConfig;
}
// 重写meta属性 对类型做限制
// export interface RouteRecordRawCon extends Omit<RouteRecordRaw, 'meta'> {
//   readonly meta: MetaConfig;
// }
// 对路由类型中的meta对象做类型限制, 对children做类型限制
export type RouteRecordRawConfig = RouteRecordRaw &
  MyRouteRecordRaw & {
    children?: RouteRecordRawConfig[];
  };
